import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { ApiProperty} from '@nestjs/swagger';
import { IsOptional } from 'class-validator';


@Entity()
export class Bulletin {
  @PrimaryGeneratedColumn({type: 'int'})
  id: number;

  @IsOptional()
  @ApiProperty()
  @Column({type: 'text'})
  title:string;

  @IsOptional()
  @ApiProperty()
  @Column({type: 'text' })
  content: number;

  @IsOptional()
  @ApiProperty()
  @Column({type: 'int', width: 11})
  enabled: number;

  @IsOptional()
  @ApiProperty()
  @Column({type: 'int', width: 11})
  sort: number;

  @Column({type: 'bigint', width: 12})
  add_time: number;

}
